<%@tag description="site resource include" body-content="empty"  pageEncoding="UTF-8"%>
<%@attribute name="type" required="true" type="java.lang.String" rtexprvalue="true" description="加载的资源类型:js或css"%>
<%@attribute name="value" required="true" type="java.lang.String" rtexprvalue="true" description="加载的资源名,js文件存放于/js目录,css文件存放于/css目录,如果只有一个文件加载,请设置 one属性=true" %>
<%@attribute name="one" required="false" type="java.lang.Boolean" rtexprvalue="false" description="加载资源是否为一个文件"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:if test="${type eq 'js'}">
    <c:if test="${one}"><script type="text/javascript" src="<c:url value="/js"/>/${value}" charset="utf-8"></script></c:if>
    <c:if test="${(empty one) or (! one)}"><script type="text/javascript" src="<c:url value="/js"/>/?f=${value}" charset="utf-8"></script></c:if>
</c:if>
<c:if test="${type eq 'css'}">
    <c:if test="${one}"><link rel="stylesheet" type="text/css" href="<c:url value="/css"/>/${value}" charset="utf-8"/></c:if>
    <c:if test="${(empty one) or (! one)}"><link rel="stylesheet" type="text/css" href="<c:url value="/css"/>/?f=${value}" charset="utf-8"/></c:if>
</c:if>